﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace Microsoft.MSE.Catalog.Contracts
{
    [DataContract(Namespace = SC.MSEEventingNamespaceURI)]
    public class WSEFilteringRequestedUnavailableFault : FaultException
    {
        public WSEFilteringRequestedUnavailableFault(string source, string message)
            : base(new FaultReason("The requested filter dialect is not supported."), new FaultCode("Client", new FaultCode("FilteringRequestedUnavailable", SC.WSENamespaceURI)), SC.FaultAction)
        {
            this.Source = source;
        }
    }

    [DataContract(Namespace = SC.MSEEventingNamespaceURI)]
    public class WSEDeliveryModeRequestedUnavailableFault : FaultException
    {
        public WSEDeliveryModeRequestedUnavailableFault(string source, string message)
            : base(new FaultReason("The requested delivery mode is not supported."), new FaultCode("Client", new FaultCode("DeliveryModeRequestedUnavailable", SC.WSENamespaceURI)), SC.FaultAction)
        {
            this.Source = source;
        }
    }

    [DataContract(Namespace = SC.MSEEventingNamespaceURI)]
    public class WSEInvalidExpirationTimeFault : FaultException
    {
        public WSEInvalidExpirationTimeFault(string source, string message)
            : base(new FaultReason("The expiration time requested is invalid."), new FaultCode("Client", new FaultCode("InvalidExpirationTime", SC.WSENamespaceURI)), SC.FaultAction)
        {
            this.Source = source;
        }
    }

    [DataContract(Namespace = SC.MSEEventingNamespaceURI)]
    public class WSEUnsupportedExpirationTypeFault : FaultException
    {
        public WSEUnsupportedExpirationTypeFault(string source, string message)
            : base(new FaultReason("Only expiration durations are supported."), new FaultCode("Client", new FaultCode("UnsupportedExpirationType", SC.WSENamespaceURI)), SC.FaultAction)
        {
            this.Source = source;
        }
    }

    [DataContract(Namespace = SC.MSEEventingNamespaceURI)]
    public class WSEFilteringNotSupportedFault : FaultException
    {
        public WSEFilteringNotSupportedFault(string source, string message)
            : base(new FaultReason("Filtering is not supported."), new FaultCode("Client", new FaultCode("FilteringNotSupported", SC.WSENamespaceURI)), SC.FaultAction)
        {
            this.Source = source;
        }
    }

    [DataContract(Namespace = SC.MSEEventingNamespaceURI)]
    public class WSEInvalidMessageFault : FaultException
    {
        public WSEInvalidMessageFault(string source, string message)
            : base(new FaultReason("The message is not valid and cannot be processed."), new FaultCode("Client", new FaultCode("InvalidMessage", SC.WSENamespaceURI)), SC.FaultAction)
        {
            this.Source = source;
        }
    }

    [DataContract(Namespace = SC.MSEEventingNamespaceURI)]
    public class WSEUnableToRenewFault : FaultException
    {
        public WSEUnableToRenewFault(string source, string message)
            : base(new FaultReason("The subscription could not be renewed."), new FaultCode("Client", new FaultCode("UnableToRenew", SC.WSENamespaceURI)), SC.FaultAction)
        {
            this.Source = source;
        }
    }
}
